package cn.kgc.houduan.service;

import cn.kgc.houduan.mapper.PersonMapper;
import cn.kgc.houduan.pojo.Person;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author shkstart
 * @create 2020-06-04 8:25
 */
@Service
public class PersonServiceImpl implements PersonService{

    @Resource
    PersonMapper personMapper;
    @Override
    public List<Person> selectPerson() {
        return personMapper.selectByExample(null);
    }

    @Override
    public Integer addPerson(Person person) {
        return personMapper.insert(person);
    }

    @Override
    public Integer deletePerson(Integer id) {
        return personMapper.deleteByPrimaryKey(id);
    }
}
